﻿<!DOCTYPE html>
<html>
<!-- 安全检查查看 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
                 size="mini">
            <el-row>
              
            </el-row>
            <el-row>
                <el-row>
                    <!--隐患描述-->
                    <el-col :span="11">
                        <div class="elst-select-mini">
                            <el-form-item prop="describe">
                                <el-input type="text" v-model="Form.describe"  autocomplete="off" size="mini"   :disabled="true" >
                                    <template slot="prepend">
                                        {{SafeCheckManagement.describe+mark.m}}
                                    </template>
                                </el-input>
                                <span class="iputLineMust" v-if="Form.describe.length<=0">
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>

                            </el-form-item>
                        </div>
                    </el-col>
                    <!--隐患类别-->
                    <el-col :span="11" offset="2">
                        <div class="elst-select-mini">
                            <el-form-item prop="hiddenTroubleClass">
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div> {{SafeCheckManagement.hiddenTroubleClass+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.hiddenTroubleClass" slot="suffix" :disabled="true"
                                               :placeholder="SafeCheckManagement.hiddenTroubleClass">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in hiddenTroubleClassL" :label="item.value"
                                                   :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                                <span class="iputLineMust" v-if="!Form.hiddenTroubleClass">
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </el-form-item>
                        </div>
                    </el-col>

                    <!--报告人-->
                    <el-col :span="11">
                        <div class="elst-select-mini">
                            <el-form-item prop="reportPerson">
                                <el-input type="text" v-model="Form.reportPerson" autocomplete="off" size="mini"  :disabled="true"  >
                                    <template slot="prepend">
                                        {{SafeCheckManagement.reportPerson+mark.m}}
                                    </template>
                                </el-input>
                                <span class="iputLineMust" v-if="Form.reportPerson.length<=0">
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </el-form-item>
                        </div>
                    </el-col>

                    <!--报告时间-->
                    <el-col :span="11" offset="2">
                        <el-form-item prop="reportDate">
                            <div class="elst-select-mini" style="margin-left: -0px">
                                <el-input size="mini">
                                    <template slot="prepend">
                                        {{SafeCheckManagement.reportDate+mark.m}}
                                    </template>
                                    <el-date-picker slot="suffix" v-model="Form.reportDate" type="date" size="mini"  :disabled="true"
                                                    format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                                    </el-date-picker>
                                </el-input>
                                <span class="iputLineMust" v-if="!Form.reportDate">
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </div>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <!--整改行动-->
                    <el-col :span="24">
                        <div class="elst-select-mini">
                            <el-form-item prop="correctiveAction">
                                <div class="el-input--mini el-input-group">
                                    <div class="el-input-group__prepend">
                                        {{SafeCheckManagement.correctiveAction+mark.m}}
                                    </div>
                                    <el-input class="el-textarea__inner" type="textarea" v-model="Form.correctiveAction"  :disabled="true"
                                              autocomplete="off">
                                    </el-input>
                                    <span class="iputLineMust" v-if="!Form.correctiveAction">
                                        <img src="/static/images/exclamation.png" alt="">
                                    </span>
                                </div>
                            </el-form-item>
                        </div>
                    </el-col>
                    <!--行动负责人-->
                    <el-col :span="11">
                        <div class="elst-select-mini">
                            <el-form-item prop="headOperations">
                                <el-input type="text" v-model="Form.headOperations" autocomplete="off" size="mini"   :disabled="true" >
                                    <template slot="prepend">
                                        {{SafeCheckManagement.headOperations+mark.m}}
                                    </template>
                                </el-input>
                                <span class="iputLineMust" v-if="!Form.headOperations">
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </el-form-item>
                        </div>
                    </el-col>
                    <!--预计完成时间-->
                    <el-col :span="11" offset="2">
                        <el-form-item prop="planDate">
                            <div class="elst-select-mini" style="margin-left: -0px">
                                <el-input size="mini">
                                    <template slot="prepend">
                                        {{SafeCheckManagement.planDate+mark.m}}
                                    </template>
                                    <el-date-picker slot="suffix" v-model="Form.planDate" type="date" size="mini"  :disabled="true"
                                                    format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择时间">
                                    </el-date-picker>
                                </el-input>

                                <span class="iputLineMust" v-if="!Form.planDate">
                                    <img src="/static/images/exclamation.png" alt="">
                                </span>
                            </div>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-row>
            <el-row>
                <!--是否完成-->
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item prop="ynFinish">
                            <el-input size="mini">
                                <template slot="prepend">
                                    <div> {{SafeCheckManagement.YNFinish+mark.m}}</div>
                                </template>
                                <el-select @visible-change="visibleChange" v-model="Form.ynFinish" slot="suffix"  :disabled="true"
                                           :placeholder="SafeCheckManagement.YNFinish">
                                    <el-option label="请选择" value=""></el-option>
                                    <el-option v-for="item in YNFinishL" :label="item.value" :value="item.key">
                                    </el-option>
                                </el-select>
                            </el-input>

                            <span class="iputLineMust" v-if="!Form.ynFinish">
                                <img src="/static/images/exclamation.png" alt="">
                            </span>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">

        var app = new Vue({

            el: '#app',
            data: {
                pageInitial: null,
                //父业传参
                id: '',
                value1: '',
                //获取下拉菜单sex
                hiddenTroubleClassL: [],
                YNFinishL: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    describe: '', //隐患描述
                    hiddenTroubleClass: '',
                    reportPerson: '',
                    reportDate: '',
                    correctiveAction: '',
                    headOperations: '',
                    planDate: '',
                    ynFinish: '',
                },
                //表单验证
                rules: {
                    describe: [
                        verification.NotNull
                    ],
                    hiddenTroubleClass: [
                        verification.NotNull

                    ],
                    reportPerson: [
                        verification.NotNull
                    ],
                    reportDate: [
                        verification.NotNull
                    ],
                    correctiveAction: [
                        verification.NotNull
                    ],
                    headOperations: [
                        verification.NotNull

                    ],
                    planDate: [
                        verification.NotNull
                    ],
                    ynFinish: [
                        verification.NotNull
                    ],
                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                btnCompleteRectification: function () {
                    this.$message({
                        message: '整改成功',
                        type: 'success'
                    });
                },
                btnConfirmRectificationResult: function () {
                    this.$message({
                        message: '确认成功',
                        type: 'success'
                    });
                },
                btnIssueRectificationNotice: function () {
                    this.$alert('行动负责人', '通知已发送整改人', {
                        confirmButtonText: '确定',
                    });
                },
                btnAdministratorAcceptanceFiling: function () {
                    this.$message({
                        message: '归档成功',
                        type: 'success'
                    });
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/ZB_SafetyCheck/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/ZB_SafetyCheck/get?id=' + this.id);
                }
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                //this.hiddenTroubleClass = getDicData('n59');
                //this.YNFinish = getDicData('50');
                this.pageInitial = PageInitial(['zbyhlb', 'zbsfwc']);//隐患类别、是否完成
                var dicDataList = this.pageInitial.dataDicList;
                //隐患类别
                this.hiddenTroubleClassL = getDicDataFodDataList(dicDataList, 'zbyhlb');//总部隐患类别
                this.YNFinishL = getDicDataFodDataList(dicDataList, 'zbsfwc'); //总部隐患类别是否完成
            }
        });
    </script>
</body>

</html>